<?php
session_start();
$link = mysqli_connect('localhost', 'root', '') or die("Failed to connect to MySQL: " . mysql_error());
if (mysqli_connect_errno()) {
        echo 'Failed to connect to MySQL';
        exit;
}
$sql = "USE web_db";
$query = mysqli_query($link,$sql);

$id=$_POST['mod_id'];
$new_sal=$_POST['sal'];

$sql = "UPDATE staff
		SET salary = '$new_sal'
		WHERE id = '$id'";

$query = mysqli_query($link,$sql);
header("location:staff_list.php");
?>